package org.fatmansoft.teach.models;

import lombok.Data;

import javax.persistence.*;
@Entity
@Data
@Table(	name = "absence_record",      //表”student_log“的实体类
        uniqueConstraints = {
        })
public class AbsenceRecord {
    @ManyToOne
    @JoinColumn(name = "student_id")    //一个学生有多条缺勤记录
    private Student student;

    @ManyToOne
    @JoinColumn(name = "teacher_id")    //和一个老师相关的有多条缺勤记录
    private Teacher teacher;

    @ManyToOne
    @JoinColumn(name = "course_id")    //一个课程有多条缺勤记录
    private Course course;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer absenceRecordId; // 主键字段

    private String date;    //缺勤日期

}
